//
//  shangpinsectionTableViewCell.m
//  BAOASystem
//
//  Created by michael on 2018/3/19.
//  Copyright © 2018年 czd. All rights reserved.
//

#import "shangpinsectionTableViewCell.h"

@implementation shangpinsectionTableViewCell
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
self.backgroundColor = [UIColor colorWithHexString:@"f0eff5"];
_view0 = [[UIView alloc]initWithFrame:CGRectZero];
_view0.backgroundColor =[UIColor whiteColor];
[self.contentView addSubview:_view0];
_view1 = [[UIView alloc]initWithFrame:CGRectZero];
_view1.backgroundColor =[UIColor colorWithHexString:@"f0eff5"];
[_view0 addSubview:_view1];
_label1 = [[UILabel alloc ]initWithFrame:CGRectZero];
_label1.textColor = [UIColor colorWithHexString:@"484848"];
[_label1 setFont:[UIFont systemFontOfSize:13]];
[_view0 addSubview:_label1];
_button1 = [UIButton buttonWithType:UIButtonTypeCustom];
[_button1 setImage:[UIImage imageNamed:@"商品组-修改"] forState:UIControlStateNormal];
[_view0 addSubview:_button1];

_button2 = [UIButton buttonWithType:UIButtonTypeCustom];
[_button2 setImage:[UIImage imageNamed:@"商品组-删除"] forState:UIControlStateNormal];
[_view0 addSubview:_button2];

_label2 = [[UILabel alloc ]initWithFrame:CGRectZero];
_label2.textColor = [UIColor colorWithHexString:@"484848"];
[_label2 setFont:[UIFont systemFontOfSize:13]];
[_view0 addSubview:_label2];

_label3 = [[UILabel alloc ]initWithFrame:CGRectZero];
_label3.textColor = [UIColor colorWithHexString:@"484848"];
[_label3 setFont:[UIFont systemFontOfSize:13]];
[_view0 addSubview:_label3];

_imageview = [[UIImageView alloc]initWithFrame:CGRectZero];
_imageview.image = [UIImage imageNamed:@"下拉"];
[_view0 addSubview:_imageview];

}

return self;

}
- (void)layoutSubviews{
[super layoutSubviews];
_view0.frame = CGRectMake(10, 5, KScreenWidth-20, 80);
_view1.frame = CGRectMake(5, 39, _view0.width-10, 1);
_label1.frame = CGRectMake(10, 0, _view0.width-100, 39);
_button1.frame = CGRectMake(KScreenWidth-90, 5, 30, 30);
_button2.frame = CGRectMake(KScreenWidth-50, 5, 30, 30);

_label2.frame = CGRectMake(10, 40, (_view0.width-20)/2-50, 40);
_label3.frame = CGRectMake(_view0.width/2, 40, (_view0.width-20)/2-40, 40);
_imageview.frame = CGRectMake(_label3.right, 50, 20, 20);
_label1.text = [NSString stringWithFormat:@"%@ :%@",NSLocalizedString(@"商品组名", nil),_dic[@"name"]];
_label2.text = [NSString stringWithFormat:@"%@ :%@",NSLocalizedString(@"商品", nil),_dic[@"pdnum"]];
if(![_dic[@"contacts"]isEqual:[NSNull null]]){
_label3.text = [NSString stringWithFormat:@"%@ :%@",NSLocalizedString(@"分配联系人", nil),_dic[@"contacts"]];
}else{
_label3.text = [NSString stringWithFormat:@"%@ :",NSLocalizedString(@"分配联系人", nil)];

}
}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
